#ifndef __string__
#define __string__
class string: public object {
public:
    string(std::string str): object(str, false) { }
    std::string get_type() { return "#<String>"; }
    void operator +=(Object obj) {
	if (obj->get_type() != "#<String>")
	    throw Error(new error(error::opera));
	std::string str = to_string() + obj->to_string();
	str.erase(to_string().length() - 1, 2);
	set_name(str);
    }
    bool operator ==(Object obj) { return to_string() == obj->to_string(); }
    bool operator !=(Object obj) { return to_string() != obj->to_string(); }
    bool operator >(Object obj) { return to_string() < obj->to_string(); }
    bool operator <(Object obj) { return to_string() > obj->to_string(); }
    bool operator >=(Object obj) { return to_string() <= obj->to_string(); }
    bool operator <=(Object obj) { return to_string() >= obj->to_string(); }
};
typedef boost::shared_ptr<string> String;
#endif
